home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / compiler / Filename.sig < prev    next >
Encoding:
Text File  |  1997-08-18  |  1.4 KB  |  29 lines  |  [TEXT/R*ch]

  1. (* Operations on file names *)
  2.  
  3. val current_dir_name : string;
  4.         (* The conventional name for the current directory
  5.            (e.g. [.] in Unix). *)
  6. val concat : string -> string -> string;
  7.         (* [concat dir file] returns a file name that designates file
  8.            [file] in directory [dir]. *)
  9. val is_absolute : string -> bool;
  10.         (* Return [true] if the file name is absolute or starts with an
  11.            explicit reference to the current directory ([./] or [../] in
  12.            Unix), and [false] if it is relative to the current directory. *)
  13. val check_suffix : string -> string -> bool;
  14.         (* [check_suffix name suff] returns [true] if the filename [name]
  15.            ends with the suffix [suff]. *)
  16. val chop_suffix : string -> string -> string;
  17.         (* [chop_suffix name suff] removes the suffix [suff] from
  18.            the filename [name]. The behavior is undefined if [name] does not
  19.            end up with the suffix [suff]. *)
  20. val basename : string -> string;
  21. val dirname : string -> string;
  22.         (* Split a file name into directory name / base file name.
  23.            [concat (dirname name) (basename name)] returns a file name
  24.            which is equivalent to [name]. Moreover, after setting the
  25.            current directory to [dirname name] (with [sys__chdir]),
  26.            references to [basename name] (which is a relative file name)
  27.        designate the same file as [name] before the call to [chdir]. *)
  28. ;;
  29.